package src.leetcode.dp.simple_0674;

public class findLengthOfLCIS {
    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(solution.findLengthOfLCIS(new int[]{1, 3, 5, 4, 7}));
    }
}


class Solution {
    public int findLengthOfLCIS(int[] nums) {
        int max = 1;
        int count = 1;

        for (int i = 0; i < nums.length - 1; i++) {
            if(nums[i] < nums[i + 1]) {
                count++;
                if(count > max) max = count;
            }else count = 1;
        }

        return max;
    }
}